﻿using Kingdee.BOS.Core.Metadata;
using Kingdee.BOS.Core.Report.PlugIn;
using Kingdee.BOS.Core.Report.PlugIn.Args;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RK.FormPlugin.BPW
{
    [Description("BPW:AGS简单账表设置背景色，表单插件"), HotUpdate]
    public class SetAgsReportColor : AbstractSysReportPlugIn
    {
        public override void OnFormatRowConditions(ReportFormatConditionArgs args)
        {
            var month = DateTime.Now.Month.ToString();
            string dyKey = $"{month}月订单数量";
            base.OnFormatRowConditions(args);
            FormatCondition jv = new FormatCondition()
            {
                BackColor = "#CD853F",
                Key = "JV成品数"
            };
            args.FormatConditions.Add(jv);
            FormatCondition hj = new FormatCondition()
            {
                BackColor = "#FF69B4",
                Key = "订单合计"
            };
            args.FormatConditions.Add(hj);
            FormatCondition dy = new FormatCondition()
            {
                BackColor = "#FFFF00",
                Key = dyKey
            };
            args.FormatConditions.Add(dy);
        }
    }
}
